Sub ForReference()
    Dim rng As Range
    Dim char As Range

    ' Check if there is a selection
    If Selection.Type = wdSelectionIP Then
        MsgBox "No text selected. Please select the text you want to modify.", vbExclamation
        Exit Sub
    End If

    ' Set the range to the current selection
    Set rng = Selection.Range

    ' Change the text color to dark Gray
    rng.Font.Color = RGB(85, 85, 85)

    ' Reduce the font size three times
    For i = 1 To 3
        rng.Font.Shrink
    Next i

    ' Loop through each character in the selection
    For Each char In rng.Characters
        ' Check if the character is highlighted
        If char.HighlightColorIndex <> wdNoHighlight Then
            ' Change only the highlighted text to light gray
            char.HighlightColorIndex = wdGray25
        End If
    Next char

    ' Clean up
    Set rng = Nothing
    Set char = Nothing
End Sub